﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace DotNetUI.Controls
{

    public class DotNetAzureNavBarItem : RadioButton
    {
        static DotNetAzureNavBarItem()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(DotNetAzureNavBarItem), new FrameworkPropertyMetadata(typeof(DotNetAzureNavBarItem)));
        }
        public static readonly DependencyProperty IconProperty = DependencyProperty.Register(nameof(Icon), typeof(ImageSource), typeof(DotNetAzureNavBarItem));
        public static readonly DependencyProperty CaptionProperty = DependencyProperty.Register(nameof(Caption), typeof(object), typeof(DotNetAzureNavBarItem));

        /// <summary>
        /// 图标
        /// </summary>
        public ImageSource Icon { get => (ImageSource)this.GetValue(IconProperty); set => SetValue(IconProperty, value); }
        /// <summary>
        /// 标题
        /// </summary>
        public object Caption { get => this.GetValue(CaptionProperty); set => SetValue(CaptionProperty, value); }
        /// <summary>
        /// 选择笔刷
        /// </summary>
        public static readonly DependencyProperty SelectBrushProperty = DependencyProperty.Register(nameof(SelectBrush), typeof(Brush), typeof(DotNetAzureNavBarItem), new PropertyMetadata(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF017239"))));
        /// <summary>
        /// 选择笔刷
        /// </summary>
        public Brush SelectBrush { get=>(Brush)this.GetValue(SelectBrushProperty); set=>SetValue(SelectBrushProperty,value); }

        /// <summary>
        /// 是否选中
        /// </summary>
        public static readonly DependencyProperty IsSmallModeProperty = DependencyProperty.Register(nameof(IsSmallMode), typeof(bool), typeof(DotNetAzureNavBarItem), new PropertyMetadata(false));
        /// <summary>
        /// 是否选中
        /// </summary>
        public bool IsSmallMode
        {
            get => this.GetValue<bool>(IsCheckedProperty);
            set => SetValue(IsCheckedProperty, value);
        }
    }
    
}
